package com.woniuxy.project115.kaer.tenant.service;

import com.woniuxy.project115.kaer.tenant.entity.TenantInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.project115.kaer.tenant.param.RegisterTenantParam;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author HuH
 * @since 2025年02月17日
 */
public interface TenantInfoService extends IService<TenantInfo> {

    void register(RegisterTenantParam param) throws Exception;

    TenantInfo login(String phone, String password) throws Exception;

    void sendRegisterCode(String phone) throws Exception;

    void sendLoginCode(String phone) throws Exception;

    TenantInfo phoneLogin(String phone, String code) throws Exception;

    void updatePassword(Integer tenantInfoId, String oldPassword, String newPassword) throws Exception;

    Integer getState(Integer tenantInfoId) throws Exception;

    void updateState(Integer tenantInfoId, Integer state) throws Exception;

    List<TenantInfo> getTenantInfo() throws Exception;

    TenantInfo getTenantInfoByToken(Integer tenantInfoId) throws Exception;
}
